package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallPromoterTrack;
import com.appkubes.mall.core.po.MallPromoterTrackExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallPromoterTrackMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_promoter_track
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallPromoterTrackSqlProvider.class, method="countByExample")
    long countByExample(MallPromoterTrackExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_promoter_track
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallPromoterTrackSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallPromoterTrackExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_promoter_track
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_promoter_track",
        "where promoter_track_key = #{promoterTrackKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String promoterTrackKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_promoter_track
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_promoter_track (promoter_track_key, app_key, ",
        "promoter_key, promoter_name, ",
        "user_key, real_name, ",
        "id_card, tel, order_key, ",
        "order_amount, create_time, ",
        "version)",
        "values (#{promoterTrackKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{promoterKey,jdbcType=VARCHAR}, #{promoterName,jdbcType=VARCHAR}, ",
        "#{userKey,jdbcType=VARCHAR}, #{realName,jdbcType=VARCHAR}, ",
        "#{idCard,jdbcType=VARCHAR}, #{tel,jdbcType=VARCHAR}, #{orderKey,jdbcType=VARCHAR}, ",
        "#{orderAmount,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ",
        "#{version,jdbcType=INTEGER})"
    })
    int insert(MallPromoterTrack record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_promoter_track
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallPromoterTrackSqlProvider.class, method="insertSelective")
    int insertSelective(MallPromoterTrack record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_promoter_track
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallPromoterTrackSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="promoter_track_key", property="promoterTrackKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="promoter_key", property="promoterKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="promoter_name", property="promoterName", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="real_name", property="realName", jdbcType=JdbcType.VARCHAR),
        @Result(column="id_card", property="idCard", jdbcType=JdbcType.VARCHAR),
        @Result(column="tel", property="tel", jdbcType=JdbcType.VARCHAR),
        @Result(column="order_key", property="orderKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="order_amount", property="orderAmount", jdbcType=JdbcType.INTEGER),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallPromoterTrack> selectByExampleWithRowbounds(MallPromoterTrackExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_promoter_track
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallPromoterTrackSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="promoter_track_key", property="promoterTrackKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="promoter_key", property="promoterKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="promoter_name", property="promoterName", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="real_name", property="realName", jdbcType=JdbcType.VARCHAR),
        @Result(column="id_card", property="idCard", jdbcType=JdbcType.VARCHAR),
        @Result(column="tel", property="tel", jdbcType=JdbcType.VARCHAR),
        @Result(column="order_key", property="orderKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="order_amount", property="orderAmount", jdbcType=JdbcType.INTEGER),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallPromoterTrack> selectByExample(MallPromoterTrackExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_promoter_track
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "promoter_track_key, app_key, promoter_key, promoter_name, user_key, real_name, ",
        "id_card, tel, order_key, order_amount, create_time, version",
        "from mall_promoter_track",
        "where promoter_track_key = #{promoterTrackKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="promoter_track_key", property="promoterTrackKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="promoter_key", property="promoterKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="promoter_name", property="promoterName", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="real_name", property="realName", jdbcType=JdbcType.VARCHAR),
        @Result(column="id_card", property="idCard", jdbcType=JdbcType.VARCHAR),
        @Result(column="tel", property="tel", jdbcType=JdbcType.VARCHAR),
        @Result(column="order_key", property="orderKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="order_amount", property="orderAmount", jdbcType=JdbcType.INTEGER),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    MallPromoterTrack selectByPrimaryKey(String promoterTrackKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_promoter_track
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallPromoterTrackSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallPromoterTrack record, @Param("example") MallPromoterTrackExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_promoter_track
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallPromoterTrackSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallPromoterTrack record, @Param("example") MallPromoterTrackExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_promoter_track
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallPromoterTrackSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallPromoterTrack record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_promoter_track
     *
     * @mbg.generated
     */
    @Update({
        "update mall_promoter_track",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "promoter_key = #{promoterKey,jdbcType=VARCHAR},",
          "promoter_name = #{promoterName,jdbcType=VARCHAR},",
          "user_key = #{userKey,jdbcType=VARCHAR},",
          "real_name = #{realName,jdbcType=VARCHAR},",
          "id_card = #{idCard,jdbcType=VARCHAR},",
          "tel = #{tel,jdbcType=VARCHAR},",
          "order_key = #{orderKey,jdbcType=VARCHAR},",
          "order_amount = #{orderAmount,jdbcType=INTEGER},",
          "create_time = #{createTime,jdbcType=TIMESTAMP},",
          "version = #{version,jdbcType=INTEGER}",
        "where promoter_track_key = #{promoterTrackKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallPromoterTrack record);
}